﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using MinhTuan;

public partial class usercontrol_other_Login : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            this.lmessage.Text = "";
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        Members mymember = Members.Member_login(txtname.Text,txtpass.Text);
        if (mymember.Members_Id > 0)
        {
            Session["user"] = mymember.Members_Id + "," + mymember.Members_Name + ",false";
            Response.Redirect("http://localhost:2011/didong/user/welcome.html");
        }
        else
        {
            //this.lmessage.Text = "Tên đăng nhập hoặc mật khẩu không đúng";
        }
    }
    //public string GetLoginPostBack()
    //{
    //    return Page.ClientScript.GetPostBackEventReference(Button1, string.Empty);
    //}
    protected void btnLogin_Click(object sender, EventArgs e)
    {
        Members mymember = Members.Member_login(txtname.Text, txtpass.Text);
        if (mymember.Members_Id > 0)
        {
            Session["user"] = mymember.Members_Id + "," + mymember.Members_Name + ",false";
            Response.Redirect("http://localhost:2011/didong/user/welcome.html");
        }
        else
        {
            //this.lmessage.Text = "Tên đăng nhập hoặc mật khẩu không đúng";
        }
    }
}
